﻿#pragma execution_character_set("utf-8")
#include "adminwidget.h"
#include "ui_adminwidget.h"
#include <QPainter>
#include <QImage>
#include <QPixmap>

AdminWidget::AdminWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::AdminWidget)
{
    ui->setupUi(this);
}

AdminWidget::~AdminWidget()
{
    delete ui;
}

void AdminWidget::paintEvent(QPaintEvent *event)
{
    QPainter painter(this);
    QImage t_image;
    //    t_image.load(":/image/bg.png");

    //    t_image = t_image.scaled(this->width(),this->height());
    //    painter.drawPixmap(0,0,this->width(),this->height(),QPixmap::fromImage(t_image));

}
//功能按钮1，发送，修改密码界面的信号
void AdminWidget::on_pushButton_1_clicked()
{
    emit sendDisWidget("m_ChangeWidget");
}

//功能按钮3，发送，进入用户管理界面的信号
void AdminWidget::on_pushButton_3_clicked()
{
    emit sendDisWidget("m_ManageWidget");
}
//功能按钮4，发送，退出软件界面的信号
void AdminWidget::on_pushButton_4_clicked()
{
       emit sendDisWidget("m_LoginWidget");
}

void AdminWidget::on_pushButton_clicked()
{
    emit sendDisWidget("m_SupplierWidget");
}

void AdminWidget::on_pushButton_2_clicked()
{
    emit sendDisWidget("m_OrderWidget");
}
//新增质检功能
void AdminWidget::on_pushButton_qa_clicked()
{
    emit sendDisWidget("m_QualityWidget");  // 这里的 "m_QualityWidget" 是你定义质检页面的代号
}
